package com.heima.article.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.heima.model.article.dtos.ArticleHomeDto;
import com.heima.model.article.pojos.ApArticle;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;

@Mapper
@Repository
public interface ApArticleMapper extends BaseMapper<ApArticle> {
	
	public List<ApArticle> loadArticle( @Param("type") Short type, @Param("dto") ArticleHomeDto dto);
	
	/**
	 * 加载近五天发布的文章
	 */
	List<ApArticle> findArticleListByLast5days(@Param("dayParam") LocalDateTime dayParam);
}